/**
 * 
 */
package edu.buu.refectory.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.buu.refectory.dao.FoodMapper;
import edu.buu.refectory.domain.Food;

/**
 * @author Bruce<br>
 * @version 1.0<br>
 * @CreateDate 1 May 2016 <br>
 */
@Service
public class FoodService{

	@Autowired
	private FoodMapper dao;
	
	/**
	 * @param food
	 * @return
	 */
	public Food create(Food food) {
		int insert = dao.insert(food);
		return food;
	}
	
	public List<Food> getList(Map<String, Object> map){
		return dao.getList(map);
	};

	public Food getById(Integer fId){
		return dao.selectByPrimaryKey(fId);
	}
	
}
